﻿Module Module1

    Sub Main()

        Dim n As Integer : Dim x As Single
        Dim number As Integer
        Console.WriteLine("Moi ban chon bai tap:")
        number = Console.ReadLine()

        Select Case number
            Case 1
                Console.Write("Ban hay nhap vao n: ")
                n = Console.ReadLine()
                module2.tinhtong(n)
                Console.WriteLine("Tong cua bieu thuc la: " & tinhtong(n))
            Case 2
                Console.Write("Ban hay nhap vao n: ")
                n = Console.ReadLine()
                Console.Write("Ban hay nhap vao gia tri cua x: ")
                x = Console.ReadLine()
                module2.Tong(x, n)
                Console.WriteLine("Tong cua bieu thuc la: " & Tong(x, n))
        End Select


    End Sub

End Module
